package com.kaiyiweitong.tongxing.activity.my;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.kaiyiweitong.tongxing.R;
import com.kaiyiweitong.tongxing.activity.my.my_money.AccountRechargeActivity;
import com.kaiyiweitong.tongxing.activity.my.my_money.ConsumeHistoryActivity;
import com.kaiyiweitong.tongxing.activity.my.my_money.RechargeHistoryActivity;
import com.kaiyiweitong.tongxing.activity.my.my_money.WithdrawActivity;
import com.kaiyiweitong.tongxing.activity.my.my_money.WithdrawHistoryActivity;
import com.kaiyiweitong.tongxing.base.BaseActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/12/17 0017.
 */

public class MyMoneyActivity extends BaseActivity {
    @Bind(R.id.total_money)
    TextView mTotalMoney;
    @Bind(R.id.my_integral)
    TextView mMyIntegral;
    @Bind(R.id.my_rebate)
    TextView mMyRebate;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_money);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.recharge_history, R.id.consume_history, R.id.withdraw_history, R.id.integral_detail, R.id.rebate_detail, R.id.recharge, R.id.withdraw})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.recharge_history:
                go2Page(RechargeHistoryActivity.class);
                break;
            case R.id.consume_history:
                go2Page(ConsumeHistoryActivity.class);
                break;
            case R.id.withdraw_history:
                go2Page(WithdrawHistoryActivity.class);
                break;
            case R.id.integral_detail:
                //todo 积分明细
                break;
            case R.id.rebate_detail:
                //todo 返佣明细
                break;
            case R.id.recharge:
                go2Page(AccountRechargeActivity.class);
                break;
            case R.id.withdraw:
                go2Page(WithdrawActivity.class);
                break;
        }
    }

    private void go2Page(Class clazz){
        Intent intent = new Intent(this, clazz);

        startActivity(intent);
    }
}
